﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HeterogeneousTree
{
    public abstract class Section<TModel> : ISection
        where TModel : BaseModel
    {
        protected IList<ISection> innerSections;
        public string SectionName { get; set; }


        public virtual TModel Model
        {
            get
            {
                return null;
            }
            set
            {
               //Do Nothing here.If needed, will be set by overriding in the child class
            }
        }

        public IList<ISection> InnerSections {
            get { return this.innerSections; }
        }

        public BaseModel GetModel()
        {
            return this.Model;
        }
    }
}
